package com.mail.dubbo.api;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.mail.dubbo.mapper.OmsOrderItemMapper;
import com.mail.model.db.OmsOrderItem;
import com.mail.model.db.OmsOrderOperateHistory;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@DubboService
public class OrderItemApiImpl implements OrderItemApi {

    @Autowired
    private OmsOrderItemMapper orderItemMapper;

    //根据订单id查询订单所包含的商品
    public List<OmsOrderItem> findOrderItem(Long orderId) {
        QueryWrapper<OmsOrderItem> qw = new QueryWrapper<>();
        qw.eq("order_id", orderId);
        return orderItemMapper.selectList(qw);
    }
}
